package com.kygeng.springframework.autowired;

import com.kygeng.springframework.bean.IMyUserService;
import com.kygeng.springframework.context.annotation.Autowired;
import com.kygeng.springframework.context.annotation.Value;
import com.kygeng.springframework.stereotype.Component;

import java.util.Random;

@Component("userService")
public class UserService implements IUserInfoService {

    @Value("${token}")
    private String token;

    @Autowired
    private UserDao userDao;

    @Override
    public String queryUserInfo() {
        return "UserService{" +
                "token='" + token + '\'' +
                ", userDao=" + userDao +
                '}';
    }
}
